package com.java.singleton;

public class TestDriver {

	public static void main(String[] args) {
		test01();
		test02();
		test03();

	}

	private static void test01() {
		// 创建一个学生的实例对象
		Student stu0 = new Student();
		// 再创建一个
		Student stu1 = new Student();
		System.out.println("stu0==stu1::" + (stu0 == stu1));
		System.out.println("==========================");
	}

	private static void test02() {
		// 创建一个学生的实例对象
		Student2 stu0 = Student2.getNewInstance();
		// 再创建一个
		Student2 stu1 = Student2.getNewInstance();
		System.out.println("stu0==stu1::" + (stu0 == stu1));
		System.out.println("==========================");
	}
	private static void test03() {
		// 创建一个学生的实例对象
		Student3 stu0 = Student3.getNewInstance();
		// 再创建一个
		Student3 stu1 = Student3.getNewInstance();
		System.out.println("stu0==stu1::" + (stu0 == stu1));
		System.out.println("==========================");
	}
}
